layui.define(function(exports){
    var store ={
        //token
        setToken:function (token) {
            localStorage.setItem("token",token);
        },
        getToken:function () {
            return localStorage.getItem("token");
        },
        clear:function () {
            localStorage.removeItem("token");
            localStorage.removeItem("name");
            localStorage.removeItem("type");
            localStorage.removeItem("studentId");
        },

        //name
        setName:function (name) {
            localStorage.setItem("name",name);
        },
        getName:function () {
            return localStorage.getItem("name");
        },

        //type
        setType:function (type) {
            localStorage.setItem("type",type);
        },
        getType:function () {
            return localStorage.getItem("type");
        },
        //type
        setStudentId:function (studentId) {
            localStorage.setItem("studentId",studentId);
        },
        getStudentId:function () {
            return localStorage.getItem("studentId");
        }
    }
    exports('store', store);
});